package org.xinghai.sql.main.generator.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.beans.BeanUtils;
import org.xinghai.sql.main.dto.CreateColumnDto;
import org.xinghai.sql.main.generator.mapper.ColumnElementsMapper;
import org.springframework.stereotype.Service;
import org.xinghai.sql.main.generator.domain.ColumnElements;
import org.xinghai.sql.main.generator.service.ColumnElementsService;

/**
* @author lijia
* &#064;description  针对表【column_elements】的数据库操作Service实现
* &#064;createDate  2025-07-28 14:18:46
*/
@Service
public class ColumnElementsServiceImpl extends ServiceImpl<ColumnElementsMapper, ColumnElements>
    implements ColumnElementsService {
    // 新增列
    @Override
    public void createColumn(CreateColumnDto createColumnDto) {
        ColumnElements column = new ColumnElements();
        // 自动拷贝所有同名属性（允许空值）
        BeanUtils.copyProperties(createColumnDto, column);
        this.save(column);
    }
}




